<!doctype html>
<html>
<head>
    <meta name="Generator"  />
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <title>天天有礼-签到</title>
    <meta name="Keywords" content="Call管家" />
    <meta name="Description" content="Call管家" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>

    <link rel="stylesheet" href="__HOMECSS__/style.css">
    <script src="__HOMEJS__/jquery-1.7.2.min.js"></script>
</head>

<body >
<div class="every_day">
    <div>
        <div class="qian" style="cursor: pointer">{$today_str == $user_info['last_sign_time']?已签到:签到}</div>
    </div>
</div>
<div class="every_day_inter"><span>前往积分兑换区</span></div>

<div style="padding-top: 10px">
    <div class="number_day_top" style="line-height: 40px;">{if condition="$today_str == $user_info['last_sign_time']"}今日已签到  <span>+{$user_info['continuous_sign_num'] == 7?5:1}</span> ！连续签到 <span>{$user_info['continuous_sign_num']}</span> 天{/if}</div>
    <ul class="number_day">
        {$html}
    </ul>
</div>

<div class="everyday_rule">
    <h3>签到积分规则</h3>
    <p>1、签到当日获得的积分实时累加，不清零；</p>
    <p>2、连续签到，获得积分加速，如中断签到则从1积分重新开始加速；</p>
</div>

<div class="eveyrday_window" style="display: none;">
    <div>
        <div class="everydaywindow_top"><img src="__HOMEIMG__/day_03.png" alt="" width="100%"><div class="colse"><img src="__HOMEIMG__/day_06.png" alt="" width="100%"></div></div>
        <div>
            <img src="__HOMEIMG__/day_08.png" alt="" width="100%">
            <p><span>恭喜您！积分 <span id="integral"></span></span> </p>
        </div>
    </div>

</div>
</body>
<script>
        $(".qian").click(function () {
            if($(this).html() != '签到'){
                return;
            }
            $.ajax({
                url:"{:Url('User/qiandao')}",
                dataType:"json",
                success:function(res){
                    if(res > 0){
                        $('#integral').html('+'+res);
                        $(".eveyrday_window").show()
                        $(this).html("已签到");
                        $(this).css('color','#999')
                    }else{
                        alert('签到失败');
                    }
                }
            })
        })
    $(".colse").click(function () {
        $(".eveyrday_window").hide();
        window.location.reload();
    })

    $(".every_day_inter").click(function () {
        window.location.href = "integral_exchange.html"
    })
</script>


</html>
